#include "Shape.h"


Shape::Shape(vec4 _pos, Rotate4 _rot){
	pos = _pos;
	rot = _rot;
	sc = 1.0f;
	shade = NULL;
	modelviewMat = mat4();
	invModelviewMat = mat4();
	updateModelViewMat();
}


Shape::~Shape(){
}

ShaderCollection* Shape::shader(){
	return shade;
}
void Shape::shader(ShaderCollection* _shader){
	shade = _shader;
}


vec4 Shape::position(){
	return pos;
}
void Shape::position(vec4 _pos){
	pos = _pos;
}
Rotate4 Shape::rotation(){
	return rot;
}
void Shape::rotation(Rotate4 _rot){
	rot = _rot;
}

float Shape::scale(){
	return sc;
}
void Shape::scale(float _scale){
	sc = _scale;
}

void Shape::updateModelViewMat(){
	modelviewMat = mat4();
	//TODO: rotate the modelview matrix in y, x, z, then w
	//modelviewMat = 

	//TODO: rotate the inverse modelview matrix in w, z, x, then y in the reverse direction

}